import Vue from 'vue'
import Router from 'vue-router'
//import Mint from 'mint-ui'

// import Main from '../pages/main.vue'
// import Tool from '../pages/tool.vue'
// import Mine from '../pages/mine.vue'
// import MemoNew from '../pages/tool/memonew.vue'
// import MemoList from '../pages/tool/memolist.vue'
// import Chart from '../pages/tool/chart.vue'
// import Loadmore from '../pages/tool/loadmore.vue'
// import MyInfo from '../pages/mine/MyInfo.vue'


const Login = resolve => require(['@/pages/Login'], resolve)
const Main = resolve => require(['@/pages/main'], resolve)
const Tool = resolve => require(['@/pages/tool'], resolve)
const Mine = resolve => require(['@/pages/mine'], resolve)
const MemoNew = resolve => require(['@/pages/tool/memonew'], resolve)
const MemoList = resolve => require(['@/pages/tool/memolist'], resolve)
const Chart = resolve => require(['@/pages/tool/chart'], resolve)
const Loadmore = resolve => require(['@/pages/tool/loadmore'], resolve)
const MyInfo = resolve => require(['@/pages/mine/MyInfo'], resolve)
//医耗审批详情
const listInfo = resolve => require(['@/pages/tool/detail'], resolve)
//医耗审批历史详情
const YHHInfo = resolve => require(['@/pages/tool/historydetail'], resolve)
const AuditHistory = resolve => require(['@/pages/tool/audithistory'], resolve)
//固定资产列表
const assetpurchaselist = resolve => require(['@/pages/tool/assetpurchaselist'], resolve)
//后勤资产列表
const servicewaitingapprovallist = resolve => require(['@/pages/tool/servicewaitingapprovallist'], resolve)
//后勤资产列表
const assetsrecordlist = resolve => require(['@/pages/tool/assetsrecordlist'], resolve)
//关于页面
const aboutinfo = resolve => require(['@/pages/mine/about'], resolve)


Vue.use(Router)
//Vue.use(Mint)

Router.prototype.go = () => {
  window.isBack = true;
  window.history.go(-1);
}


export default new Router({
  routes: [{
    path: "/main",
    name: 'main',
    component: Main,
    meta: {
      requireAuth: false
    }
  },
    {
      path: "/tool",
      name: 'tool',
      component: Tool,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/mine",
      name: 'mine',
      component: Mine,
      meta: {
        requireAuth: false
      }
    }, ,
    {
      path: "/tool/memonew",
      name: 'toolMenonew',
      component: MemoNew,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/tool/memolist",
      name: 'toolMemolist',
      component: MemoList,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/tool/chart",
      name: 'toolChart',
      component: Chart,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/tool/loadmore",
      name: 'toolLoadmore',
      component: Loadmore,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/tool/listInfo",
      name: 'toolListInfo',
      component: listInfo,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/tool/YHHInfo",
      name: 'toolYHHInfo',
      component: YHHInfo,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/tool/audithisotry",
      name: 'audithisotry',
      component: AuditHistory,
      meta: {
        requireAuth: false
      }
    },

    {
      path: "/tool/assetpurchaselist",
      name: 'toolAssetpurchaselist',
      component: assetpurchaselist,
      meta: {
        requireAuth: false
      }
    }, {
      path: "/tool/servicewaitingapprovallist",
      name: 'toolServicewaitingapprovallist',
      component: servicewaitingapprovallist,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/tool/assetsrecordlist",
      name: 'assetsrecordlist',
      component: assetsrecordlist,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/mine/myinfo",
      name: 'toolMyinfo',
      component: MyInfo,
      meta: {
        requireAuth: false
      }
    },
    {
      path: "/mine/about",
      name: 'mineAbout',
      component: aboutinfo,
      meta: {
        requireAuth: false
      }
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
      meta: {
        requireAuth: false
      }
    },
    {
      path: '/',
      name: 'Login',
      component: Login,
      meta: {
        requireAuth: false
      }
    }
  ]

});
